﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Fake_Shop_WebApi.Models
{
    public class TouristRoutePicture
    {
        //照片id
        [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)] //因为图片id需要为整数自增
        public int Id { get; set; }
        //照片数据
       [MaxLength(100)]
        public string Url { get; set; }
        //外键Id
        [ForeignKey("TouristRouteId")] //  所有类在自动生成的时候都会以类名加Id组成一个Id名
        public Guid TouristRouteId { get; set; }
        //建立连接
        public TouristRoute TouristRoute { get; set; }
        
    }
}
